From e11fdc71ab25b249b1c9f48ed5d1eb73a9199dc1 Mon Sep 17 00:00:00 2001 From: robertlipe Date: Sat, 8 Dec 2012 16:57:37 +0000 Subject: [PATCH] Sheesh. Fix a bug I introduced yesterday in pocketfms_wp highlighting the very style of code I so badly want to replace. --- gpsbabel/pocketfms_wp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gpsbabel/pocketfms_wp.c b/gpsbabel/pocketfms_wp.c index a43dce3fb..d7c9c3a9d 100644 --- a/gpsbabel/pocketfms_wp.c +++ b/gpsbabel/pocketfms_wp.c @@ -106,7 +106,7 @@ enigma_waypt_disp(const waypoint *wpt) if (wpt->shortname) { // The output might have a space or control character. int i, l = strlen(wpt->shortname); - t = xmalloc(l); + t = xmalloc(l + 1); char *d = t; for (i = 0; i < l; i++) { char s = wpt->shortname[i]; -- 2.30.2